<?php

class order_list extends CI_Controller {
   
     
    function __construct() {
    		// Call the Controller constructor
	    	parent::__construct();
    }

    function index() {
    		$this->load->model('order_model');
    		$allorders = $this->order_model->getAll();
    		$data['allorders']=$allorders;
    		
    		//Original load->view line for file!
    		$this->load->view('order_list.php', $data);
    }

	function read($id) {
		$this->load->model('orderitem_model');
		$orderitem = $this->orderitem_model->getAll($id);
		$data['orderitem']=$orderitem;
		$this->load->view('read.php',$data);
    
	}
}

